<?php
/**
 * @Copyright Copyright (C) 2010-2012
 * @license GNU/GPL http://www.gnu.org/copyleft/gpl.html
 + Created by:          Webit Solution
 * Company:		Webit Solution
 + Contact:		www.webits.asia, developer@webits.asia
 * Created on:	Mar 21, 2012
 ^
 + Project: 		WRecruit
 * File Name:	views/employer/tmpl/jobsearchresults.php
 ^ 
 * Description: template view job search results
 ^ 
 * History:		NONE
 ^ 
 */
 
 defined('_JEXEC') or die('Restricted access');
 global $mainframe;

 $document =& JFactory::getDocument();
 $document->addStyleSheet('components/com_wrecruit/css/'.$this->config['theme']);
// $link = 'index.php?option=com_wrecruit&c=wrecruit&view=employer&layout=resume_searchresults&Itemid='.$this->Itemid;
 $link_basic = 'index.php?option=com_wrecruit&c=wrecruit&view=employer&layout=basicinfo';
 $link = 'index.php?option=com_wrecruit&c=wrecruit&view=employer&layout=resume_searchresults';
?>

<?php if ($this->config['offline'] == '1'){ ?>
<table cellpadding="0" cellspacing="0" border="0" width="100%" >
	<tr><td valign="top" class="<?php echo $this->theme['title']; ?>" >	<?php echo $this->config['title']; ?></td></tr>
	<tr><td height="25"></td></tr>
	<tr><td class="wrecruitmsg">
		<?php echo $this->config['offline_text']; ?>
	</td></tr>
</table>	
<?php }else{ ?>
<script>
jQuery(document).ready(function() {
	/* for keeping track of what's "open" */
	var activeClass = 'dropdown_detail-active', showingDropdown, showingMenu, showingParent;
	/* hides the current menu */
	var hideMenu = function() {
		if(showingDropdown) {
			showingDropdown.removeClass(activeClass);
			showingMenu.hide();
		}
	};
	
	/* recurse through dropdown menus */
	jQuery('.dropdown_detail').each(function() {
		/* track elements: menu, parent */
		var dropdown_detail = jQuery(this);
		var menu = dropdown_detail.next('div.dropdown_detail-menu'), parent = dropdown_detail.parent();
		/* function that shows THIS menu */
		var showMenu = function() {
			hideMenu();
			showingDropdown = dropdown_detail.addClass('dropdown_detail-active');
			showingMenu = menu.show();
			showingParent = parent;
		};
		/* function to show menu when clicked */
		dropdown_detail.bind('click',function(e) {
			if(e) e.stopPropagation();
			if(e) e.preventDefault();
			showMenu();
		});
		/* function to show menu when someone tabs to the box */
		dropdown_detail.bind('focus',function() {
			showMenu();
		});
	});
	
	/* hide when clicked outside */
	jQuery(document).bind('click',function(e) {
		if(showingParent) {
			var parentElement = showingParent[0];
			if(!jQuery.contains(parentElement,e.target) || !parentElement == e.target) {
				hideMenu();
			}
		}
	});

	jQuery(".submitClassSend").click(function (){
		var comment = jQuery('#submitComment').val();
		alert(comment);
		if (comment == ""){
			jQuery('.anycomment').text('Please input any comment!!!');
			return;	
		}
		jQuery(".submitClassSend").each(function (){		
			jQuery(this).parent().removeClass('displayBlock');
			jQuery(this).parent().addClass('displayNone');
			jQuery(".confirmOk").parent().removeClass('displayNone');
		});
		jQuery.ajax({
            type: 'POST',
            url: "<?php echo JURI::root()?>index.php?option=com_wrecruit&c=wrecruit&view=employer&layout=sentdetail",
            success: function(result) {
				//alert("tgest");   
           	} 			
      	});				
	});
	jQuery(".addtopoolList").click(function (){	
		var thisjQuery = jQuery(this);
		var resume = thisjQuery.attr('value');
		var type = thisjQuery.attr('type');
		jQuery.ajax({
            type: 'POST',
            url: "<?php echo JURI::root()?>index.php?option=com_wrecruit&c=wrecruit&view=employer&layout=add2pool&resume="+resume,
            success: function(result) {	
			
				if (type == 'delete'){
					thisjQuery.text('Add to your candidate list');
					thisjQuery.removeAttr('type');
					thisjQuery.attr('type', 'add');
				}else{
					thisjQuery.text('Delete from your candidate list');
					thisjQuery.removeAttr('type');
					thisjQuery.attr('type', 'delete');					
				}
           	} 			
      	});
		return false;
	});	
	jQuery(".confirmOk").click(function (){		
		hideMenu();		
		jQuery(".confirmOk").each(function (){	
			jQuery(this).parent().removeClass('displayNone');
			jQuery(this).parent().addClass('displayNone');		
			jQuery(".submitClassSend").parent().addClass('displayBlock');
		});	
	});	
	jQuery(".move_up-down").click(function (){
		var sortlist = jQuery(".sortfield").val();
		sortField(sortlist);
	});
});
</script>
<script language="javascript">
function myValidate(f) {
	if (document.formvalidator.isValid(f)) {
			//f.check.value='<?php echo JUtility::getToken(); ?>';//send token
			//returnvalue = true; 
	}
	else {
			alert('Search name is not acceptable.  Please retry.');
			return false;
	}
	return true;
}
function sortField(field){
	window.location = field;
}
function showsavesearch(val) {
		var ie= ((document.all)&&(!document.layers)) ? true : false;
		var ns= ((document.layers)&&(!document.getElementById)) ? true : false;
		var moz= ((document.getElementById)&&(!document.all)) ? true : false;
	
		if (val == 1){
			if(ie)
			{
				document.all['savesearch'].style.position = "relative";
				document.all['savesearch'].style.visibility="visible";
			}
			if(ns) {document.layers['savesearch'].visibility="show";}
			if(moz)
			{
				document.getElementById('savesearch').style.position = "relative";	
				document.getElementById('savesearch').style.visibility="visible";
			}
			if(ie)
			{
				document.all['savethis'].style.position = "absolute";
				document.all['savethis'].style.visibility="hidden";
			}
			if(ns) {document.layers['savethis'].visibility="hide";}
			if(moz)
			{
				document.getElementById('savethis').style.position = "absolute";	
				document.getElementById('savethis').style.visibility="hidden";
			}
		}else{	
			if(ie)
			{
				document.all['savethis'].style.position = "relative";
				document.all['savethis'].style.visibility="visible";
			}
			if(ns) {document.layers['savethis'].visibility="show";}
			if(moz)
			{
				document.getElementById('savethis').style.position = "relative";	
				document.getElementById('savethis').style.visibility="visible";
			}
			if(ie)
			{
				document.all['savesearch'].style.position = "absolute";
				document.all['savesearch'].style.visibility="hidden";
			}
			if(ns) {document.layers['savesearch'].visibility="hide";}
			if(moz)
			{
				document.getElementById('savesearch').style.position = "absolute";	
				document.getElementById('savesearch').style.visibility="hidden";
			}
		
		}

}
</script>
<style>
a.reqestdetail{
	color: #000000;
	text-decoration: underline;
}
a.reqestdetail:hover{
	color: #FE7613;
	text-decoration: underline;
}
</style>
<div style="padding: 10px 0 10px 10px;border: 1px solid #e1e1e1">
	<div style="float: left;width: 175px;" class="b-leftcontent employer-panel">		
		<?php require_once(JPATH_COMPONENT.DS.'views'.DS.'employer'.DS.'tmpl'.DS.'left_panel.php');?>
		</div>
		<!--
		<div class="panel-employee">Employee Control Pannel</div>
		<hr style="width: 75%;border:1px solid #fe7613" />
		<?php 
		if (sizeof($this->employerlinks) != 0){				
			echo '<ul>';
			foreach($this->employerlinks as $lnk)	{ ?>
				<li class="b-left-list" <?php /*if($lnk[2] == 1)echo 'class="first"'; elseif($lnk[2] == -1)echo 'class="last"';  */?>>
					<a href="<?php echo $lnk[0]; ?>"> <?php echo $lnk[1]; ?></a>
				</li>
			<?php }
			echo '</ul>';			
		}
		?>
		-->
	<div style="float: right;width: 75%">
	<table cellpadding="0" cellspacing="0" border="0" width="100%" >
		<tr><td valign="top" class="<?php echo $this->theme['title']; ?>" >	
			<?php //echo $this->config['title']; ?>
		</td>
		</tr>
<!--		<tr><td height="23"></td></tr>-->
		<tr><td><table border="0" width="100%" cellpadding="0" cellspacing="0" >
		<tr>
			<?php if ($this->config['cur_location'] == 1) {?>
			<td class="curloc" valign="bottom">
				<?php //echo JText::_('JS_CUR_LOC'); ?><!--  : <a href="index.php?option=com_wrecruit&c=wrecruit&view=employer&layout=resumesearch&Itemid=<?php echo $this->Itemid; ?>" class="curloclnk"><?php echo JText::_('JS_SEARCH_RESUME'); ?></a>--> <?php //echo JText::_('JS_RESUME_SEARCH_RESULT'); ?>
			</td>
			<?php } ?>
			
			<?php if ($this->canview == 1) {
			if ($this->searchresumeconfig['search_resume_showsave'] == 1) {?>
			<td id="savethis" width="30" align="right">
					<input type="button" class="button" onclick="showsavesearch(1);" value="<?php echo JText::_('JS_SAVE_THIS_SEARCH'); ?>">
			</td>
			<?php } ?>
		</tr>
			<?php if ($this->searchresumeconfig['search_resume_showsave'] == 1) {?>
				<form action="index.php" method="post" name="adminForm" id="adminForm" onsubmit="return myValidate(this);">
				<tr id="savesearch">
					<td colspan="2"> <?php echo JText::_('JS_SEARCH_NAME'); ?> &nbsp;: &nbsp;&nbsp;<input class="inputbox required" type="text" name="searchname" size="20" maxlength="30"  />
					&nbsp;&nbsp;&nbsp;<input type="submit" class="button validate" value="<?php echo JText::_('JS_SAVE'); ?>">
					</td>
				</tr>
				<input type="hidden" name="option" value="<?php echo $this->option; ?>" />
				<input type="hidden" name="task" value="saveresumesearch" />
				</form>	
			<?php }
			} ?>
		</table></td></tr>
		<tr><td>
				<?php 
				/*if (sizeof($this->employerlinks) != 0){
					echo '<div id="toplinks"><ul>';
					foreach($this->employerlinks as $lnk)	{ ?>
						<span <?php if($lnk[2] == 1)echo 'class="first"'; elseif($lnk[2] == -1)echo 'class="last"';  ?>>
							<a href="<?php echo $lnk[0]; ?>"> <?php echo $lnk[1]; ?></a>
						</span>
					<?php }
					echo '<ul></div>';			
				}*/
				?>
		</td></tr>
<!--		<tr><td height="3"></td></tr>-->
		<tr><td class="<?php //echo $this->theme['heading']; ?>" align="left">		
			<div class="head-title">
				<h2><?php echo JText::_('JS_CV_SEARCH_RESULT'); ?></h2>
			</div>			
			<div style="clear: both"></div>
		</td></tr>
		<tr><td height="3"></td></tr>
	</table>
	
	<?php
	if ($this->resumes){
	
	if ($this->userrole->rolefor == 1) { // employer
	
		if ($this->sortlinks['sortorder'] == 'ASC')
			$img = "components/com_wrecruit/images/sort0.png";
		else
			$img = "components/com_wrecruit/images/sort1.png";
	?>
			<table cellpadding="0" cellspacing="0" border="0" width="100%" >
				<tr class="<?php //echo $this->theme['sortlinks']; ?>">
					<td valign="middle" class="<?php //echo $this->theme['sortlinks']; ?>" align="right" style="padding-bottom: 10px;">						 						
						<?php 
							$sortbys = "resume_searchresults/";
							if ($this->sortlinks['sorton']){
								$sortbys = "";	
							}
						?>
						<div style="float:left;font-weight: bold;font-size: 10px;"></div>
						<div style="text-align: left;color:#666666;">							
							<table border="0" cellpadding="0" cellspacing="0" width="100%">
							<tr>
								<td style="font-weight: bold">We found <span style="color: #FE7613;"><?php echo $this->totalRecord?></span> CVs matched to your search </td>
								<td width="289">
									<div class="sorttitle" style="text-align: right">
									Sort by : 
									<select size="1" name="sortby" class="dropdown-box sortfield" onchange="return sortField(this.value)">
										<option <?php echo ($this->sortlinks['sorton'] == 'created') ? "selected='selected'" : "" ?> value="<?php echo $sortbys.$this->sortlinks['created']; ?>"><?php echo JText::_('JS_DATEPOSTED'); ?></option>
										<option <?php echo ($this->sortlinks['sorton'] == 'application_title') ? "selected='selected'" : "" ?> value="<?php echo $sortbys.$this->sortlinks['application_title']; ?>"><?php echo JText::_('JS_TITLE'); ?></option>
										<option <?php echo ($this->sortlinks['sorton'] == 'jobtype') ? "selected='selected'" : "" ?> value="<?php echo $sortbys.$this->sortlinks['jobtype']; ?>"><?php echo JText::_('JS_JOBTYPE'); ?></option>
										<option <?php echo ($this->sortlinks['sorton'] == 'salaryrange') ? "selected='selected'" : "" ?> value="<?php echo $sortbys.$this->sortlinks['salaryrange']; ?>"><?php echo JText::_('JS_SALARY_RANGE'); ?></option>										
									</select>
									</div>
								</td>
								<td valign="middle" style="padding: 0px !important;margin:0px !important">
									<span class="button" style="vertical-align: middle">
										<a href="#" class="move_up-down"><img src="/talent-web/components/com_wrecruit/images/arrow_up-down.png" alt="Move Up/Down"> </a>
									</span>
								</td>
							</tr>
							</table>																			
						</div>					
						<div style="clear: both"></div>
					</td>
				</tr>
				<tr><td style="padding-bottom: 10px;" align="right"><div><input style="cursor: pointer;background: url(images/editsearch.png) no-repeat; width: 133px;height: 30px;border: none" type="button" name="edit_search" onclick="javascript:history.back(1);" /></div></td></tr>
				</table>
		      <?php if ( $this->searchresumeconfig['search_resume_style'] == 'classic' ) { ?>
		
		                <table cellpadding="0" cellspacing="0" border="0" width="100%">
				<?php 
				$tdclass = array($this->theme['odd'], $this->theme['even']);
				$isnew = date("Y-m-d H:i:s", strtotime("-$this->config['newdays'] days"));
				//$tdclass = array("odd", "even");
				$isodd =1;
				foreach($this->resumes as $resume)	{ 
				$isodd = 1 - $isodd; ?>
				<tr height="20" class="<?php echo $tdclass[$isodd]; ?>" > <td colspan="5">
					<table cellpadding="0" cellspacing="0" border="0" width="100%">
						<tr><td height="3"></td></tr>
						<tr>
							<td class="maintext">&nbsp;<strong><?php echo JText::_('JS_TITLE'); ?>	</strong></td>
							<td class="maintext" colspan="3"><?php echo $resume->application_title;	?></td>
						</tr>
						<tr>
							<td class="maintext" width="20%">&nbsp;<strong><?php echo JText::_('JS_CATEGORY'); ?>	</strong></td>
							<td class="maintext" width="30%"><?php echo $resume->cat_title; ?></td>
							<td class="maintext">&nbsp;<strong><?php echo JText::_('JS_SALARY_RANGE'); ?>	</strong></td>
							<td class="maintext"><?php $salary = $this->config['currency'] . $resume->rangestart . ' - ' . $this->config['currency'] . $resume->rangeend . ' /month';
											echo $salary; ?></td>
						</tr>
						<tr>
							<td class="maintext" width="20%">&nbsp;<strong><?php echo JText::_('JS_JOBTYPE'); ?>	</strong></td>
							<td class="maintext" width="30%"><?php echo $resume->jobtypetitle;?></td>
							<td class="maintext">&nbsp;<strong><?php echo JText::_('JS_CREATED'); ?>	</strong></td>
							<td class="maintext"><?php echo date($this->config['date_format'],strtotime($resume->create_date)); ?></td>
						</tr>
						<tr>
							<td></td>
							<td class="maintext" align="right"> 
								<?php $link = 'index.php?option=com_wrecruit&c=wrecruit&view=jobseeker&layout=view_resume&vm=3&rd='.$resume->id.'&bd=0&Itemid='.$this->Itemid; ?>
								<a class="pageLink" href="<?php echo $link?>"><strong><?php echo JText::_('JS_VIEW'); ?></strong></a>
							&nbsp;&nbsp;</td>
							<td class="maintext" colspan="2" align="left" >
								<?php $link = 'index.php?option=com_wrecruit&c=wrecruit&view=jobseeker&layout=view_coverletters&vts=2&clu='.$resume->uid.'&Itemid='.$this->Itemid; ?>
								<a class="pageLink" href="<?php echo $link?>"><strong><?php echo JText::_('JS_VIEW_COVER_LETTERS'); ?></strong></a>
							</td>
						
						</tr>
						<tr><td height="3"></td></tr>
					</table>	
				</td></tr>
				<?php
				}
				 ?>		
			</table>
		
	            <?php  }elseif ( $this->searchresumeconfig['search_resume_style'] == 'july2011' ){ ?>
					
	                <table cellpadding="0" cellspacing="0" border="0" width="100%">
	                <?php
			$tdclass = array($this->theme['odd'], $this->theme['even']);
			$isnew = date("Y-m-d H:i:s", strtotime("-$this->config['newdays'] days"));
			//$tdclass = array("odd", "even");
			$isodd =1;				
			foreach($this->resumes as $resume)	{
	                $comma = "";
			$isodd = 1 - $isodd; ?>
			<tr height="20" class="<?php echo $tdclass[$isodd]; ?>" > <td colspan="5">
				<table cellpadding="0" cellspacing="0" border="0" width="100%">
				<div style="padding:10px;background-color:#f7f7f7;border: 1px solid #e6e6e6">
								<div class="wrecruit_resumeimg" style="float: left; width: 100px;height: 98px;border: 1px solid #dfdfdf" >							
			                    	<?php if($resume->photo != '') { ?>
										<a href="<?php echo $link_basic.'/'.$resume->id?>"><img  src="<?php echo $this->config['data_directory']; ?>/data/jobseeker/resume_<?php echo $resume->id ; ?>/photo/<?php echo $resume->photo ; ?>" width="150px" height="150px" title="picture"  alt="Resume Photo"/></a>
									<?php } ?>
								</div>
								<div style="float: left;padding-left: 10px;width: 78%">
	                            <div class="wrecruit_resumetop">
	                                <!--<span class="wrecruit_titlestyle" ><?php echo $resume->first_name.' '.$resume->last_name ?></span>-->
	<!--                                <span  class="wrecruit_titlestyle" style="text-decoration: underline;color: #FE7613"><a href="#"><?php echo ''. $resume->application_title; ?> </a></span>-->
	                                <!--<span class="wrecruit_addresslocationset">
	                                    <strong>
	                                    <?php echo JText::_('JS_ADDRESS'); ?></strong>
	                                        <?php if($resume->cityname != '') { ?>
	                                            <?php echo $comma.$resume->cityname; $comma = " ," ; ?>
	                                        <?php } elseif($resume->employer_city != ''){ ?>
	                                            <?php echo $comma.$resume->employer_city; $comma = " ," ; ?>
	                                        <?php } ?>
	
	                                        <?php if($resume->countyname != '') { ?>
	                                            <?php echo $comma.$resume->countyname; $comma = " ," ; ?>
	                                        <?php } elseif($resume->employer_county != ''){ ?>
	                                            <?php echo $comma.$resume->employer_county; $comma = " ," ; ?>
	                                        <?php } ?>
	                                        <?php if($resume->statename != '') { ?>
	                                            <?php echo $comma.$resume->statename; $comma = " ," ; ?>
	                                        <?php }elseif($resume->employer_state != ''){ ?>
	                                            <?php echo $comma.$resume->employer_state; $comma = " ,"; ?>
	                                        <?php } ?>
	                                        <?php if($resume->countryname != '') { ?>
	                                            <?php echo $comma.$resume->countryname; ?>
	                                        <?php } ?>
	                                </span>-->
	                            </div>
	                            
	                            <!--<div class="wrecruit_resumeworkexp">
	                                <span class="wrecruit_titlestylewx"><?php echo JText::_('JS_WORK_EXPERIENCE').'<br>'; ?></span>
	                                    <?php //echo $resume->employer_position.'<br>'; ?>
	                                    <?php //echo $resume->employer.'<br>'; ?>
	                                    <?php //echo $resume->employer_resp.'<br>'; ?>
	                                    <?php //echo $resume->employer_from_date .' - '. $resume->employer_to_date.'<br>'; ?>
	                                    <?php //echo $resume->employer_address.'<br>'; ?>
	
	                            </div>-->                         
	                            <div class="wrecruit_resumeinfo" style="float:left;">
	                            	<div  class="wrecruit_titlestyle" style="text-decoration: underline;color: #FE7613"><a href="<?php echo $link_basic.'/'.$resume->id?>"><?php echo ''. $resume->application_title; ?> </a></div>
	                                <?php echo $resume->cat_title."<br />";//value -1 for array index ?>
	                                <?php 
	//                              	$salary = $this->config['currency'] . $resume->rangestart . ' - ' . $this->config['currency'] . $resume->rangeend . JText::_('JS_PERMONTH');
										$salary = $resume->symbol . $resume->rangestart . ' - ' . $resume->symbol.' ' . $resume->rangeend . JText::_('JS_PERMONTH');
	                                echo $salary.'<br>'; ?>
	                                <?php //echo $resume->jobtypetitle.'<br>';?>
	                                <?php //echo $resume->email_address.'<br>'; ?>
	                                <?php echo JText::_('JS_DATEPOSTED'); ?> <?php echo date($this->config['date_format'],strtotime($resume->create_date)); ?>
									<br /><br />
	                            </div>
	                            <div style="float:right;padding-top:0px;text-align:right;height: 45px;">                           	
	                            	<div style="vertical-align: top;"><a href="<?php echo $link_basic.'/'.$resume->id?>"><img src="images/cvview.png" width="20" /></a></div>
	                            	<div style="height: 40px;">&nbsp;</div>	                            	
									<div>								
										<?php if($resume->poolid){?>
										<a value="<?php echo $resume->id?>" type="delete" class="add2pool addtopoolList" href="#">
										<span>
										<?php echo JText::_('Delete from your candidate list');?>
										</span></a>
										<?php }else{?>										
										<a value="<?php echo $resume->id?>" type="add" class="add2pool addtopoolList" href="#">
										<span>
										<?php echo JText::_('Add to your candidate list');?>
										</span></a>
										<?php }?>
									</div>
									<div>
										<?php $link = 'index.php?option=com_wrecruit&c=wrecruit&view=jobseeker&layout=view_resume&vm=3&rd='.$resume->id.'&bd=0&Itemid='.$this->Itemid; ?>
										<!--<a class="reqestdetail" href="<?php echo $link?>"><strong><?php echo JText::_('Request for detail'); ?></strong></a>-->
										<div id="menu2"><div class="relative">
											<a href="#"  id="dd2" class="dropdown_detail" rel="dropdown_detail2" style="width:170px;text-decoration:underline;"><span><?php echo JText::_('Request for detail'); ?></span></a>
											<div id="dropdown_detail2" class="dropdown_detail-menu">
												<form action="#">												
												<div style="text-align: left">
													<div style="height: 10px"></div>												
													<div style="float: left;width: 40%;text-align: left;font-weight: bold;"><h3 style="font-size: 20px"><?php echo JText::_('Request for detail'); ?></h3></div>
													<div style="float: right;width: 59%;padding-top: 6px;"><hr style="border: 2px solid #d7d7d7" /></div>
													<div style="clear: both;height: 10px"></div>
													<div class="displayBlock">
														<div style="height: 25px;font-weight: bold">You are requesting the detail of the CV number: <?php echo $resume->id?></div>
														<div><span style="vertical-align:top;padding-right: 10px;font-weight: bold">Comment:</span><span><textarea name="submitComment" id="submitComment" style="width: 400px;height: 60px"></textarea> </span></div>
														<div style="height: 10px"></div>
														<div style="text-align: right" class="submitClassSend">															
															<button class="gradient-button-yellow" type="submit"><?php echo JText::_('JS_SEARCH'); ?></button>
															<!-- <input class="submitClass" type="button" value="<?php echo JText::_('Send&nbsp;&nbsp;');?>"> -->
														</div>
													</div>
													<div class="displayNone" style="text-align: center">
														<div style="height: 25px;">Your request has submitted to us.</div>														
														<div style="height: 25px;">We will process your request and return to you in the best time</div>	
														<div class="confirmOk">
															<button class="gradient-button-yellow" type="submit"><?php echo JText::_('OK'); ?></button>
															<!--<input class="submitClass" type="button" value="<?php echo JText::_('OK&nbsp;&nbsp;');?>">-->
														</div>											
													</div>
													<div style="height: 10px"></div>																									
												</div>			
												</form>									
											</div>
										</div></div>
										OR&nbsp;
										<a class="reqestdetail" href="<?php echo $link?>"><strong><?php echo JText::_('view full CV'); ?></strong></a>
									</div>
								</div>
	                            <div style="clear:both"></div>
	                            <div class="wrecruit_resumebottom">
						<!--<span class="maintext" >
							<?php $link = 'index.php?option=com_wrecruit&c=wrecruit&view=jobseeker&layout=view_resume&vm=3&rd='.$resume->id.'&bd=0&Itemid='.$this->Itemid; ?>
							<a class="pageLink" href="<?php echo $link?>"><strong><?php echo JText::_('JS_VIEW'); ?></strong></a>
						</span>
						<span class="maintext"  >
							<?php $link = 'index.php?option=com_wrecruit&c=wrecruit&view=jobseeker&layout=view_coverletters&vts=2&clu='.$resume->uid.'&Itemid='.$this->Itemid; ?>
							<a class="pageLink" href="<?php echo $link?>"><strong><?php echo JText::_('JS_VIEW_COVER_LETTERS'); ?></strong></a>
						</span>-->
	
	
						</div>
	                    </div>
	                    <div style="clear: both"></div>
	            	</div>
	            	<div style="height: 8px"></div>       
				</table>
			</td></tr>
			<?php
			}
			 ?>		 
		</table>
	
	
	
	         <?php    } ?>
	
		<form action="<?php echo JRoute::_('index.php?option=com_wrecruit&c=wrecruit&view=employer&layout=resume_searchresults&Itemid='.$this->Itemid); ?>" method="post">
		<table cellpadding="0" cellspacing="0" border="0" width="100%" >
	    <tr>
	        <td></td>
	        <td >
	            <?php
	            echo $this->pagination->getPagesLinks();
	            ?>
	        </td>
	    </tr>
	    <tr height="10"></tr>
	    <tr>
	        <td align="left">
	            <?php echo JText::_('JS_DISPLAY_#'); ?>
	            <?php
	            echo $this->pagination->getLimitBox();
	            ?>
	        </td>
	        <td align="right">
	            <?php
	            echo $this->pagination->getResultsCounter();
	            ?>
	        </td>
	    </tr>
		</table>
		</form>	
	
	
<?php

} else{ // not allowed job posting
	//Update by Vireak on 09/08/2012
	//Add frame to this warning and some styling
	//---------------------
	echo '<div class="box-list"><div class="head-title"><h2>Oop!</h2></div>';
	echo '<span class="wr_info"><p>'.JText::_('JS_YOU_ARE_NOT_ALLOWED_TO_VIEW').'</p>';
	echo '<p>This page is reserved for the authorized employers or recruiters only. </p></span>';
	echo '</div>';
	//---------------------
}	
}else{ // no result found in this category
	//Update by Vireak on 09/08/2012
	//Add frame to this warning and some styling
	//---------------------
	echo '<div class="box-list"><div class="head-title"><h2>Oop!</h2></div>';
	echo '<span class="wr_info"><p>'.JText::_('JS_RESULT_NOT_FOUND').'</p>';
	echo '<p></p></span>';
	echo '</div>';
	//---------------------
}
?>	
</div>
<div style="clear: both"></div>
</div>


<script language="javascript">
	showsavesearch(0); 
</script>
<?php 
}//ol
?>
<div width="100%">
<?php 
if($this->config['fr_cr_txsh']) {
	echo 
	'<table width="100%" style="table-layout:fixed;">
		<tr><td height="15"></td></tr>
		<tr><td style="vertical-align:top;" align="center">'.$this->config['fr_cr_txa'].$this->config['fr_cr_txb'].'</td></tr>
	</table>';
}	
?>
</div>
